package org.jeecg.modules.meter.mapper;



import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.entity.meter.MeterRead;

import java.util.List;

/**
 * @Description: 读表记录表
 * @Author: jeecg-boot
 * @Date:   2020-11-20
 * @Version: V1.0
 */
public interface MeterReadMapper extends BaseMapper<MeterRead> {
    List<MeterRead> findLastMeterReads(@Param("meterIdList") List<String> meterIdList);

    MeterRead getLastMeterReadByNo(@Param("meterCode") String meterCode);

    MeterRead getLastMeterReadByKey(@Param("meterKey") String meterKey);
    @SqlParser(filter = true)
    void saveBatchTiming(@Param("nowMeterReadList") List<MeterRead> nowMeterReadList);

    void updateRepairRead(@Param("meterRead") MeterRead oldMeterRead);
    List<MeterRead> getList(@Param("meterId") String id);
}
